module Main where



main :: IO()
main = do
    let c = Copper 0
    print $ cost c
    print $ coinValue c
    let e = Estate 1
    print $ cost e
    print $ pointValue e

getCost :: (Card a) => a -> Int
getCost = cost

class Card a where
    cost :: (Card a) => a -> Int

class Victory a where
    pointValue :: (Victory a) => a -> Int

class Treasure a where
    coinValue :: (Treasure a) => a -> Int

class Action a where
    play :: (Action a) => a -> Game -> Game

data Player = Player { name :: String }

data Game = Game { players :: [Player] }

data Copper = Copper Int deriving (Eq) -- the Int is an id number

instance Card Copper where
    cost _ = 0

instance Treasure Copper where
    coinValue _ = 1

data Estate = Estate Int deriving (Eq)

instance Card Estate where
    cost _ = 2

instance Victory Estate where
    pointValue _ = 1

data Harem = Harem Int deriving (Eq)

instance Card Harem where
    cost _ = 6

instance Treasure Harem where
    coinValue _ = 2

instance Victory Harem where
    pointValue _ = 2